<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ include file="/WEB-INF/views/pageMenu/header.jsp" %>
<%@ include file="/WEB-INF/views/pageMenu/sidebar.jsp" %>
<%@ include file="/WEB-INF/views/pageMenu/footer.jsp" %>
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>节点维护</title>
    <link rel="stylesheet" type="text/css"
          href='<spring:url value="/resources/zTreeStyle/zTreeStyle.css"></spring:url>'>
    <script src='<spring:url value="/resources/tree/jquery.ztree.core-3.4.js"></spring:url>'></script>
    <script src='<spring:url value="/resources/tree/jquery.ztree.excheck-3.4.js"></spring:url>'></script>
    <script src='<spring:url value="/resources/tree/LoadNode.js"></spring:url>'></script>
    <style>

        .weller {
            font-size: 20px;
        }

        .weller input {
            height: 30px;
        }

        .alert {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            background-color: #F5F5DC;
            text-align: center;
            z-index: 9999999;
        }

        #treeDemo span, #treeDemo1 span {
            font-size: 14px;
        }
    </style>
    <script>

        $(document).ready(function () {
            findFather();
        });
    </script>
</head>
<body>
<div class="pageinfo">
    <%--<div>--%>
    <%--<span class="page-title">组织维护</span>--%>
    <%--</div>--%>
    <ul class="breadcrumb">
        <li>
            <i class="icon-home"></i>
            <a href="/auth/desktop">主页</a>
            <i class="icon-angle-right"></i>
        </li>
        <li>
            <a style="text-decoration: none">维护</a>
            <i class="icon-angle-right"></i>
        </li>
        <li>
            <a href="${url}">组织维护</a>
        </li>
    </ul>
    <div class="span6">
        <ul id="treeDemo" style="height:600px;overflow-y:auto;" class="ztree"></ul>
    </div>
    <div class="weller span6">
        <from method="post">
            <p id="name" style="display:none;">节点名：<input type="text" maxlength="15" id="input_name"/><span
                    style="color: red;">*最大长度15个字符</span></p>

            <input type="button" class="btn red" value="删除" id="delete" style="display:none;" onclick="deleteNode();">
            <input type="button" class="btn blue" data-toggle="modal" href="#responsive2" value="新建" id="add"
                   style="display:none;" onclick="cancelAction();">
            <input type="button" class="btn green" value="修改" id="alter" onclick="alterName();" style="display:none;">
            <input type="button" class="btn yellow" data-toggle="modal" href="#responsive1" value="转移" id="move"
                   onclick="alertMove();" style="display:none;">
            <input id="txt_Forlderid" name="" type="text" style="display:none;" value=""/>
            <input id="input_id" size="50" name="contentForlder.id" type="text" style="display:none;" value=""/>
        </from>
    </div>

</div>

<!-- 模态框转移开始 -->
<div id="responsive1" class="modal hide fade" tabindex="-1" data-width="760">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h3>转移</h3>
    </div>

    <div class="modal-body" style="text-align:center;font-size:20px;">
        <h4>选择一个节点</h4>

        <div style="height:300px;">
            <ul id="treeDemo1" style="height:200px;overflow-y:auto;" class="ztree"></ul>
            <div>
                <label>当前选中的节点: <span id="input_contentForlderName_showName"> </span></label>
                <input id="nodeId" type="hidden"/>
                <input id="nodeFId" type="hidden"/>
            </div>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn blue" onClick="OKAction();">转移</button>
        <button type="button" data-dismiss="modal" class="btn">关闭</button>
    </div>
</div>
<!-- 模态框转移结束 -->

<!-- 模态框新建开始 -->
<div id="responsive2" class="modal hide fade" tabindex="-1" data-width="760" style="margin-top:10%">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h3>新建</h3>
    </div>

    <div class="modal-body" style="text-align:center;font-size:20px;">
        <p>节点名：<input type="text" maxlength="15" id="new_name" style="height:30px;"/><span
                style="color: red;">*最大长度15个字符</span></p>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn blue" onclick="newNode();">添加</button>
        <button type="button" data-dismiss="modal" class="btn">关闭</button>
    </div>
</div>
<!-- 模态框修改结束 -->
<script>
    $(document).ready(function () {
        $("#treenode").attr("class", "active");
        $("#treenode").parent().parent().addClass("open").addClass("active");
    });
</script>
</body>
</html>